import greenfoot.*;  // (World, Actor, GreenfootImage, Greenfoot and MouseInfo)
import java.util.*;

/**
 * Abstract Superclass of all special items.
 * 
 * @author (Thomas KOBER) 
 * @author (Dilyan GEORGIEV)
 * 
 * @version (1.0)
 */
public abstract class SpecialItem extends Actor
{
    /**
     * Act - do whatever the SpecialItem wants to do. This method is called whenever
     * the 'Act' or 'Run' button gets pressed in the environment.
     */
    public void act() 
    {}
    
    /**
     * abstract method
     * Returns the Items value.
     * @return the Items value.
     */
    abstract public int getItemValue();
    
    /**
     * Return one intersecting object of the given class.
     * @param cls class of object to be checked for intersection.
     * @return intersecting object.
     */
    protected Actor getOneIntersectingObject(Class cls)
    {
        return super.getOneIntersectingObject(cls);
    }
    
    /**
     * Returns the objects of the given class in the given range.
     * @param radius the radius to check.
     * @param cls the class of the object which are checked.
     * @return list of objects in range.
     */
    protected List getObjectsInRange(int radius, Class cls)
    {
        return super.getObjectsInRange(radius, cls);
    }
}
